/**
 * @Author: Bobby
 * @Date: 2022-02-15 13:14:17
 * @LastEditTime: 2022-03-01 10:18:01
 * @LastEditors: Bobby
 * @Description:
 * @FilePath: \wms-v2\src\ve\common\components\baseComs\form\uiDate.js
 * @CIMC-V2
 */
import { exInput, exSwitch, exSizeSelect, exTextarea, exRadioGroup, exValidateSelect } from '@ve/common/components/extension'

export default {
  VERSION: '20220408',
  type: 'uiDate',
  name: '日期',
  icon: 'calendar-2-line',
  //数据别名
  // dataName: 'uiDate_data',
  //数据集合 表单 列表等等
  data: {
    requestData: {},
  },
  extension: {
    model: exInput('Model', 'date_name'),
    label: exInput('标签', '日期'),
    //rule: exSwitch('验证', false),
    extendRule: exValidateSelect('', {}, []),
    // ...exDivider(0),
    tooltip: { ...exTextarea('弹窗提示', '', '', 3), isSuperior: true },
    width: { ...exInput('宽度', 'auto', '填写数字:单位px,auto:自动宽度'), isSuperior: true },
    labelWidth: { ...exInput('label宽度', 'auto', '填写数字:单位px,auto:自动宽度'), isSuperior: true },
    size: exSizeSelect('尺寸', 'mini'),
    placeholder: exInput('提示', '请输入'),
    selection: exRadioGroup('类型', 'datetime', [
      {
        value: 'datetime',
        label: '日期时间',
      },
      {
        value: 'date',
        label: '日期',
      },
      {
        value: 'month',
        label: '月份',
      },
      {
        value: 'datetimerange',
        label: '日期时间范围',
      },
      {
        value: 'daterange',
        label: '日期范围',
      },
      {
        value: 'monthrange',
        label: '月份范围',
      },
    ]),
    disabled: exSwitch('禁用', false),
    hidden: exSwitch('隐藏', false),
    defaultDate: exRadioGroup('默认值', '', [
      {
        value: '',
        label: '无',
      },
      {
        value: 'now',
        label: '当前',
      },
      {
        value: 'yesterday',
        label: '昨天',
      },
      {
        value: 'oneDay',
        label: '近一天',
      },
      {
        value: 'threeDay',
        label: '近三天',
      },
      {
        value: 'week',
        label: '近一周',
      },
      {
        value: 'month',
        label: '近一月',
      },
      {
        value: 'year',
        label: '近一年',
      },
    ]),
    nowDateLimit: {
      ...exRadioGroup('时间限定', '', [
        {
          value: '',
          label: '无',
        },
        {
          value: 'befor',
          label: '当前之前',
        },
        {
          value: 'after',
          label: '当前之后',
        },
      ]),
      isSuperior: true,
    },
    startSuffix: { ...exInput('开始后缀', '_start'), isSuperior: true },
    endSuffix: { ...exInput('结束后缀', '_end'), isSuperior: true },
    ignoreClearValue: { ...exSwitch('忽略清空', false, '开启后清空表单会保留默认值'), isSuperior: true },
    enterSelect: {
      type: 'exModuleSelect',
      name: '回车选中',
      value: [],
      hasCheckbox: false,
      treeData: '$getPageModules',
      isSuperior: true,
    },
    defaultTime: {
      type: 'exDoubleInput',
      name: '默认时间',
      value: ['00:00:00', '23:59:59'],
      tooltip: '当为日期时间范围选择时，开始日期的默认时间与结束日期的默认时间。请填写正确的时间字符串格式。',
      isSuperior: true,
    },
  },
  //交互
  interaction: [],
  //条件、逻辑指令
  logicInstruction: [],
}
